package com.cc.service.impl;

import com.cc.entity.Dormitory;
import com.cc.mapper.DormitoryMapper;
import com.cc.service.DormitoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class DormitoryServiceImpl implements DormitoryService {
    @Autowired
    private DormitoryMapper  dormitoryMapper;
    @Transactional
    @Override
    public int addDormitory(Dormitory dormitory) {
        return dormitoryMapper.addDormitory(dormitory);
    }

    @Override
    public int updateDormitory(Dormitory dormitory) {
        return dormitoryMapper.updateDormitory(dormitory);
    }

    @Override
    public int deleteDormitory(Integer id) {
        return dormitoryMapper.deleteDormitory(id);
    }
}
